<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>订单界面</title>
	<link rel="stylesheet" type="text/css" href="/stylesheets/base.css">
  <link rel="stylesheet" type="text/css" href="/stylesheets/home.css">
  <link rel="stylesheet" type="text/css" href="/stylesheets/index.css">
   <link rel="stylesheet" type="text/css" href="/stylesheets/shopp_dingdan.css">
</head>
<body>
	  <div id="all">
    <div id="top">
       <div id="topa">
        <ul>    
          <% for(var i =0 ;i<data.length;i++){%>
          <%if(data[i].a_name!=null){%>
                    <li id="a">欢迎*<a href="/gerenxinxi"><%=data[i].a_name%></a></li>
                    <li id="closeLogin"><a href="javascript:loginClose('<%=data[i].a_name%>')">退出登录</a></li>
                    <%break;%>
          <%}else if(i>3&&data[i].a_name==null){%>
          <li id="a"><a href="/login">亲！请登录</a></li>
           <%break;%>
          <%}%>
          <%}%>
        </ul>
      </div>
      <div id="topb">
        <ul>
          <li ><a href="/hregist">后台管理</a></li>
          <li id="b"><a href=""><img src="/images/sm_r7_c23.jpg">联系客服</a></li>
        </ul>
      </div>
    </div>
    <div id="logo">
      <div id="img3"><img src="/images/touz.png" style="height: 100px  "></div>
      <div id="img2"><img src="/images/tou.png" style="height: 100px  "></div>

      <div id="img"><img src="/images/logo1.png" alt=""></div>
      <div id="ming">JOINFIT</div>
    </div>
    <div id="head">
      <ul>
       <li><a href="/">首页</a></li>
        <li ><a href="javascript:shopp_car()">购物车</a></li>
        <li ><a href="javascript:dingdan()">查看订单</a></li>
        <li ><a href="/huiyuan">会员修改</a></li>
        <li ><a href="/zhuce">注册有礼</a></li>
        <li ><a href="/liaotian">聊天室</a></li>
      </ul>
    </div>

<div id="che">订单详情</div>
	<table id="shopp_car" border="1">
         <tr>
         	<td>订单编号</td>
         	<td>商品名称</td>
         	<td>商品数量</td>
          <td>商品单价</td>
         	<td>商品总价</td>
         	<td>发货状态</td>
         </tr>
		<% for(var i =0 ;i<data.length;i++){%>
     <%if(data[i].c_shopp==null){%>
      <%continue%>
      <%}%>
  			<tr>
  				<td><%=data[i].c_bianhao%></td>
  				<td><%=data[i].c_shopp%></td>
  				<td><%=data[i].c_number%></td>
          <td><%=data[i].c_price%></td>
  				<td><%=data[i].c_price*data[i].c_number%></td>
  				<td><%=data[i].c_zhuangtai%></td>
   			</tr>
		<%} %>
  	</table>

    <script>
       function loginClose(t){
      var str=`/login_close_handler?name=${t}`;
      location.href=str;
    }
     function shopp_car(){   //跳转购物车需先判断
      if (document.getElementById('closeLogin')!=null) {  //如果有退出登录的 表示用户已经登录 
        var str=`/shopp_car`;
        location.href=str;
      }
    }
     function dingdan(){   //跳订单界面需先判断
      if (document.getElementById('closeLogin')!=null) {  //如果有退出登录的 表示用户已经登录 
        var str=`/dingdan`;
        location.href=str;
      }
    }
    </script>
</body>
</html>